// src/mock/flow.js
export const mockFlowData = {
  // 节点数据
  nodes: [
    {
      id: '1',
      data: {
        title: '需求提报', //节点名称
        // 多岗位
        jobs: [
          { name: '主责部门A', status: 'success' }, //岗位名称、岗位名称前显示的状态（未到节点、进行中、进行中逾期、已完成逾期、已完成无逾期）
          { name: '主责部门B', status: 'none' },
        ],
        tasks: 0, //任务数量
        positions: 0, //岗位数量
        status: 'not-started', //状态（未到节点、进行中、进行中逾期、已完成逾期、已完成无逾期）
        overdue: 0, //逾期个数
        planTime: '2024-07-20', //计划完成时间
        finishTime: '', //实际完成时间
      },
    },
    {
      id: '2',
      data: {
        title: '方案设计',
        jobs: [
          { name: '主责部门A', status: 'success' },
          { name: '主责部门B', status: 'success' },
        ],
        tasks: 2,
        positions: 2,
        status: 'in-progress',
        overdue: 0,
        planTime: '2024-07-21',
        finishTime: '',
      },
    },
    {
      id: '3',
      data: {
        title: '方案评审',
        jobs: [
          { name: '主责部门A', status: 'success' },
          { name: '主责部门B', status: 'in-progress-overdue' },
        ],
        tasks: 3,
        positions: 3,
        status: 'in-progress-overdue',
        overdue: 2,
        planTime: '2024-07-22',
        finishTime: '',
      },
    },
    {
      id: '4',
      data: {
        title: '预算编制',
        jobs: [
          { name: '主责部门A', status: 'finish-overdue' },
          { name: '主责部门B', status: 'in-progress-overdue' },
        ],
        tasks: 4,
        positions: 4,
        status: 'finished-overdue',
        overdue: 1,
        planTime: '2024-07-23',
        finishTime: '2024-07-25',
      },
    },
    {
      id: '5',
      data: {
        title: '预算审核',
        jobs: [{ name: '主责部门A', status: 'success' }],
        tasks: 5,
        positions: 5,
        status: 'finished',
        overdue: 0,
        planTime: '2024-07-24',
        finishTime: '2024-07-24',
      },
    },
    {
      id: '6',
      data: {
        title: '施工准备',
        jobs: [{ name: '主责部门A', status: 'success' }],
        tasks: 6,
        positions: 6,
        status: 'not-started',
        overdue: 0,
        planTime: '2024-07-25',
        finishTime: '',
      },
    },
    {
      id: '7',
      data: {
        title: '施工执行',
        jobs: [{ name: '主责部门A', status: 'success' }],
        tasks: 7,
        positions: 7,
        status: 'not-started',
        overdue: 0,
        planTime: '2024-07-26',
        finishTime: '',
      },
    },
    {
      id: '8',
      data: {
        title: '验收',
        jobs: [{ name: '主责部门A', status: 'success' }],
        tasks: 8,
        positions: 8,
        status: 'not-started',
        overdue: 0,
        planTime: '2024-07-27',
        finishTime: '',
      },
    },
    {
      id: '9',
      data: {
        title: '结算',
        jobs: [{ name: '主责部门A', status: 'success' }],
        tasks: 9,
        positions: 9,
        status: 'not-started',
        overdue: 0,
        planTime: '2024-07-28',
        finishTime: '',
      },
    },
  ],
  // 连线的list
  edges: [
    { source: '1', target: '2' }, //source 当前节点id，target 表示当前source指向的节点id，1->2表示从1节点连接2节点，1的后置是2
    { source: '2', target: '3' }, //开始并行，2的后置是3、4
    { source: '2', target: '4' },
    { source: '3', target: '5' }, //3的后置为5
    { source: '4', target: '6' }, //4的后置是6
    { source: '5', target: '7' }, //5的后置是7
    { source: '6', target: '7' }, //6的后置是7
    { source: '7', target: '8' }, //7的后置是8
    { source: '8', target: '9' }, //8的后置是9
  ],
  // 同一个source指向多个target就开始并行，入口
  // 不同的source指向同一个target为并行的出口
}
